#ifndef  __BRD_SC7A20_H
#define  __BRD_SC7A20_H

//----------------------------------Include-------------------------------------
#include  <stdint.h>
//------------------------------------------------------------------------------

//-----------------------------------Macro--------------------------------------
#define RADDR_OUT_TEMP_L            0x0C
#define RADDR_OUT_TEMP_H            0x0D
#define RADDR_WHO_AM_I              0x0F
#define RADDR_TEMP_CFG              0x1F
#define RADDR_CTRL_REG1             0x20
#define RADDR_CTRL_REG2             0x21
#define RADDR_CTRL_REG3             0x22
#define RADDR_CTRL_REG4             0x23
#define RADDR_CTRL_REG5             0x24
#define RADDR_CTRL_REG6             0x25
#define RADDR_STATUS_REG            0x27
#define RADDR_OUT_X_L               0x28
#define RADDR_OUT_X_H               0x29
#define RADDR_OUT_Y_L               0x2A
#define RADDR_OUT_Y_H               0x2B
#define RADDR_OUT_Z_L               0x2C
#define RADDR_OUT_Z_H               0x2D
#define RADDR_FIFO_CTRL_REG         0x2E
#define RADDR_FIFO_SRC_REG          0x2F
#define RADDR_INT1_CFG              0x30
#define RADDR_INT1_SRC              0x31
#define RADDR_INT1_THS              0x32
#define RADDR_INT1_DUR              0x33
#define RADDR_INT2_CFG              0x34
#define RADDR_INT2_SRC              0x35
#define RADDR_INT2_THS              0x36
#define RADDR_INT2_DUR              0x37
#define RADDR_CLICK_CFG             0x38
#define RADDR_CLICK_SRC             0x39
#define RADDR_CLICK_THS             0x3A
#define RADDR_TIME_LIMIT            0x3B
#define RADDR_TIME_LATENCY          0x3C
#define RADDR_TIME_WINDOW           0x3D
#define RADDR_ACT_THS               0x3E
#define RADDR_ACT_DURATION          0x3F
//------------------------------------------------------------------------------
#define ACC_RANGE                   2000        //mG
//------------------------------------------------------------------------------

//----------------------------------Declare-------------------------------------
void     brd_init_sc7a20(void);
void     brd_close_sc7a20(void);
void     brd_sc7a20_open_comm(void);
void     brd_sc7a20_close_comm(void);
uint8_t  brd_sc7a20_rd_one_byte(uint8_t reg);
void     brd_sc7a20_rd_n_byte(uint8_t reg, uint8_t* pdata, uint8_t len);
void     brd_sc7a20_wr_one_byte(uint8_t reg, uint8_t data);
void     brd_sc7a20_wr_n_byte(uint8_t reg, uint8_t* pdata, uint8_t len);
//------------------------------------------------------------------------------

#endif
//------------------------------------EOF---------------------------------------



